//
//  MVCollectionViewCell.m
//  23-QQ音乐
//
//  Created by dllo on 16/8/15.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MVCollectionViewCell.h"
#import "MVConllectionList.h"
#import "UIImageView+WebCache.h"
@interface MVCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imageViewPic;
@property (weak, nonatomic) IBOutlet UILabel *songName;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;

@end

@implementation MVCollectionViewCell
- (void)setMyCollectionList:(MVConllectionList *)myCollectionList
{
    _myCollectionList = myCollectionList;
    NSString *songAndSinger = [myCollectionList.mvtitle stringByAppendingFormat:@" - %@",myCollectionList.singername];
    _songName.text = songAndSinger;
    _descLabel.text = myCollectionList.mvdesc;
    if (myCollectionList.picurl.length != 0) {
    [_imageViewPic sd_setImageWithURL:[NSURL URLWithString:myCollectionList.picurl]];
    } else {
        NSString *imageUrl = [NSString stringWithFormat:@"http://shp.qpic.cn/qqvideo_ori/0/%@_360_204/0?max_age=259200",myCollectionList.vid];
        [_imageViewPic sd_setImageWithURL:[NSURL URLWithString:imageUrl]];
    }
}
@end
